﻿<UserControl x:Class="SlotDuino.ChampionshipControl"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dal="clr-namespace:SlotDuino.DAL;assembly=SlotDuino.DAL" 
    xmlns:converter="clr-namespace:SlotDuino.Converter"
	mc:Ignorable="d"
    Loaded="UserControl_Loaded">

    <UserControl.Resources>
        <CollectionViewSource x:Key="nextRaceViewSource" d:DesignSource="{d:DesignInstance dal:ChampionshipRace, CreateList=True} "/>
        <CollectionViewSource x:Key="nextHeatViewSource"  d:DesignSource="{d:DesignInstance dal:Pilot, CreateList=True} "/>
    </UserControl.Resources>
    <StackPanel Width="165">
 	<Label Content="Próxima Corrida" Margin="0,0,0,5" />
        <DataGrid x:Name="dtgNextChampRace" DataContext="{Binding Source={StaticResource nextRaceViewSource}}" Background="{StaticResource SelectedBackgroundBrush}" Height="190" Margin="0,0,0,5" ItemsSource="{Binding}">
 	           	<DataGrid.Columns>
            		<DataGridTextColumn Header="Piloto"/>
            		<DataGridTextColumn Header="Fenda"/>
            	</DataGrid.Columns>	
	</DataGrid>
	<Button x:Name="btnPause" Content="Pausar" Margin="0,0,0,5" Height="50"/>
	<Label Content="Próxima Bateria" Margin="0,0,0,5" />
        <ListView Name="lstNexHeat" Height="200" DataContext="{Binding Source={StaticResource nextHeatViewSource}}" ItemsSource="{Binding}"  Margin="0,0,0,5"></ListView>
    </StackPanel>
</UserControl>